import React, { FC } from 'react';
import { withSideTitle } from '../hoc/withSideTitle';
import { CommonListExperience } from './CommonListExperience';

const COM_PREKEY = 'InfoListWithSideTitle';

interface InfoListWithSideTitleProps {
    title: string;
    contents: string[];
}

const InfoListWithSideTitle: FC<InfoListWithSideTitleProps> = (props) => {
    const Component = withSideTitle(CommonListExperience, props.title);

    return <Component experiences={props.contents} />;
};

InfoListWithSideTitle.displayName = 'InfoListWithSideTitle';

export { InfoListWithSideTitle, InfoListWithSideTitleProps };
